# -*- coding: utf-8 -*-
# @Author: QX
# @File: Generatestring.py
import random


def generate_unique_string():
    all_chars = 'abcdefghijklmnopqrstuvwxyz0123456789'
    #random.sample()函数直接从字符集中随机选取不重复的 5 个字符
    unique_str = 'C' + ''.join(random.sample(all_chars, 6))
    return unique_str

if __name__ == '__main__':
    print(generate_unique_string())


